package dk.dashboardFP.panels.displayPanel {
	import dk.dashboardFP.elements.button.SmallButtonElement;
	import dk.dashboardFP.elements.IElement;
	import dk.dashboardFP.elements.button.ToggleButtonPropertyElement;
	import dk.dashboardFP.panels.panelElements.AbstractDashboardFPPanel;
	import dk.dashboardFP.panels.subPanels.AbsDashboardFPSubPanel;
	import dk.dashboardFP.panels.subPanels.SubPanelModel;
	import dk.dashboardFP.panels.subPanels.SubPanelPlane;

	/**
	 * @author josef
	 */
	public class DisplayPanelControlSubPanel extends SubPanelPlane {
		private var _oToolsButtonGroup : IElement;

		public function DisplayPanelControlSubPanel(oDashboardFPPanel : AbstractDashboardFPPanel, sSubPanelPlaneTitle : String) {
			super(oDashboardFPPanel, sSubPanelPlaneTitle);
			
			//:::::::
			// toggle button 
			_doSubPanelUI.addElement(new ToggleButtonPropertyElement(DisplayPanelControlModel(oSubPanelModel).oDisplayEditorEnabledProp, "Editor mode"));
			
			//:::::::
			// tools bar 
			_oToolsButtonGroup=_doSubPanelUI.addElement(new ToolsButtonGroup(oDashboardFPPanel as DisplayPanel));
			
			//:::::::
			// inspect dc button 
			_doSubPanelUI.addElement(new SmallButtonElement("inspect_dc", "Inspect", "DisplayChain"));
			
		}

		override protected function get_oSubPanelModel(oSubPanel : AbsDashboardFPSubPanel) : SubPanelModel {
			return new DisplayPanelControlModel(oSubPanel);
		}

		public function registerControls() : void {
			ToolsButtonGroup(_oToolsButtonGroup).registerControls();
		}
	}
}
